<?php
add_action('admin_init', 'create_category_store_metadata');

function create_category_store_metadata()
{
    // Get store category
    $tax_store = get_terms('store_category',array('hide_empty'=>false));
    $arr_store_categories = array();
    foreach ($tax_store as $v) {
        $temp = array();
        $temp['label'] = $v->name;
        $temp['value'] = strtolower($v->name);
        array_push($arr_store_categories, $temp);
    }
    // Create metabox
	$category_store_meta_box = array(
		'id' => 'box_category_store_metadata',
		'title' => 'Select category',
		'desc' => '',
		'pages' => array('store'),
		'context' => 'normal',
		'priority' => 'high',
		'fields' => array(array(
				'id' => 'category_store_metadata',
				'label' => '',
				'desc' => '',
				'std' => '',
				'type' => 'checkbox',
				'class' => '',
                'choices' => $arr_store_categories
                )));

	ot_register_meta_box($category_store_meta_box);

}
?>